<%@ include file="/WEB-INF/jsp/include/skin_head.jsp" %><%@ page language="java" pageEncoding="UTF-8"%>
    <div id="pw_bbs" style="width: ${bbsType.bbsWidth}px;">
        <div id="pw_bbs_hader">${bbsType.bbsTopContent}</div>
        <div id="pw_bbs_body">
        
        <sec:authorize ifNotGranted="ROLE_USER">
            <div id="pw_bbs_comment">
                <img src="<c:url value="/img/skin/default/warning.gif"/>" class="pw_bsc" /> 
                You are not logged in. Any changes you make will be marked as anonymous. You may want to <a href="<c:url value="/user/login.do" />">Log In</a> if you already have an account. You can also <a href="<c:url value="/user/signup.do" />">Sign Up</a> for a new account. 
            </div>
            <div>
                <img src="<c:url value="/jcaptcha.jpg" />" /> <br />
                Please type the word appearing in the picture. <input type="text" name="jcaptcha" value="" />
            </div>
        </sec:authorize>
        
        <sec:authorize ifAnyGranted="ROLE_USER">
            <div>
                <sec:authentication property="name" /> 
            </div>
        </sec:authorize>
            
            <div id="pw_bbs_edit">
                <div id="pw_bbs_edit_header"></div>
                <div id="pw_bbs_edit_body">
                    <div class="row">
                        <label for="title"><spring:message code="bbs.title"/></label>
                        <span class="pw_padding_w30">
                            <form:input path="title" cssStyle="width:550px" readonly="${ param.command == 'REMOVE' ? true : false}" />
                            <form:hidden path="categorySid" id="categorySid" />
                        </span>
                        <span class="pw_need">*</span>
                    </div>
                       <form:errors path="title" cssClass="pw_need" />
                </div>
                <div id="SAGAEditorBox" style="width: ${(bbsType.bbsWidth - 2)}px; height: 225px; z-index: 0; position: relative;" class="WebEditor_box">
                    ${webEditor}
                    <form:textarea path="content" cols="75" rows="7" cssClass="WebEditor" cssStyle="display: none" readonly="${ param.command == 'REMOVE' ? true : false}" />
                       <form:errors path="content" cssClass="pw_need" />
                </div>
                <div id="pw_bbs_edit_etc">
                    <div class="row">
                        <img src="<c:url value="/img/skin/default/i_bul.gif"/>" class="pw_bsc" />
                        <label for="tagName"><spring:message code="bbs.tag"/></label>
                        <span class="pw_padding_w56">
                            <form:input path="tagName" size="33" readonly="${ param.command == 'REMOVE' ? true : false}" /> <form:errors path="tagName" />
                        </span>
                        <label for="tagName"><spring:message code="bbs.tagDesc"/></label>
                    </div>
                    <%--c:if test="${not empty bbsCategory}">
                    <div class="row">
                        <img src="<c:url value="/img/skin/default/i_bul.gif"/>" class="pw_bsc" />
                        <label for="categorySid"><spring:message code="bbs.category"/></label>
                        <span class="pw_padding_w30">
                            <form:select path="categorySid" disabled="${ param.command == 'REMOVE' ? true : false}">
                                <form:option value=""><spring:message code="category.default" /></form:option>
                                <form:options items="${bbsCategory}" />
                            </form:select>
                        </span>
                        <label for="categorySid">
                            &nbsp;<form:errors path="categorySid" cssClass="pw_need" />
                        </label>
                    </div>
                    </c:if>
                    <div class="row">
                        <img src="<c:url value="/img/skin/default/i_bul.gif"/>" class="pw_bsc" />
                        <label for="userPasswd"><spring:message code="bbs.userPasswd"/></label>
                        <span class="pw_padding_w30">
                            <form:password path="userPasswd" maxlength="32" /> <span class=pw_need>*</span>
                        </span>
                        <label for="userPasswd">
                            &nbsp;<form:errors path="userPasswd" cssClass="pw_need" />
                        </label>
                    </div>
        
                    <div class="file">
                        <img src="<c:url value="/img/skin/default/i_bul.gif"/>" class="pw_bsc" />
                        <label for="file[0]"><spring:message code="bbs.attachFile"/></label>
                        <span id="pw_uploading"><img src="<c:url value="/img/skin/default/loading.gif"/>" class="pw_bsc" /></span>
                        <fieldset id="pw_file_box">
                            <div id="pw_file_disply_items0"><spring:message code="bbs.attachFileDesc"/></div>
                        </fieldset>
                        <div id="pw_file_box_list">
                            <div id="pw_file_items"></div>
                            <span id="pw_file_item0">
                                <input id="file0" name="file[0]" type="file" size="30" onchange="attach(this, '0');"  readonly="${param.command == 'REMOVE' ? 'readonly' : ''}" />
                            </span>
                        </div>
                    </div --%>
                </div>
                <div id=pw_btn_action>
                    <a href="<c:url value="/bbs/list.do?bbsId="/>${param.bbsId}"><img src="<c:url value="/img/skin/default/btn_list.gif"/>" class="pw_pointer" /></a>
                    <img src="<c:url value="/img/skin/default/btn_read_save.gif"/>" class="pw_pointer" onclick="editFormSubmit('frmBbs', 'content');" />
                    <img src="<c:url value="/img/skin/default/btn_overview.gif"/>" class="pw_pointer" />
                </div>
            </div>        
            <div id="progressBar" style="display: none;">
                <div id="progressBarText"></div>
                <div id="progressBarBox">
                   <div id="progressBarBoxContent"></div>
                </div>
            </div>

    
        </div>
    </div>      